define(['egis'], function (egis) {
    Window.deserializer = Window.deserializer || new egis.core.Deserializer();
    Window.container = Window.container || {};
    dsBridge.register('create_PlotElement', function (sourceId) {
        var plotElement = new egis.sfs.PlotElement({});
        plotElement.id = sourceId;
        Window.container[sourceId] = plotElement;
    });

    dsBridge.register('PlotElement_add', function (sourceId, elementId) {
        try {
            var plotElement = Window.container[sourceId];
            var element = Window.container[elementId];
            plotElement.add(element);
        }
        catch (e){
            alert(e)
        }
    });

    dsBridge.register('PlotElement_remove', function (sourceId,elementId) {
        var plotElement = Window.container[sourceId];
        var element = Window.container[elementId];
        plotElement.remove(element);
    });
})
